package fl.ass.service.service.impl;

import cmm.service.core.framework.biz.BaseBizImpl;
import cmm.service.core.framework.dao.IBaseDao;
import cn.cmm.base.framework.exception.BaseException;
import fl.ass.facade.condition.AssVfRtnLogQC;
import fl.ass.facade.dto.AssVfRtnLogDTO;
import fl.ass.service.dao.AssVfRtnLogMapper;
import fl.ass.service.po.AssVfRtnLog;
import fl.ass.service.service.IAssVfRtnLogService;
import fl.ass.service.transform.AssVfRtnLogTransform;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;


/**
 * @Description: 资产核销回款记录表 服务层接口实现
 * @Description: 类中已经实现了简单增删改查操作, 可以直接使用, 如果有需要重写该方法即可：
 * @Description: 1、add(TVO entity) 2、removeById(Long id) 3、modify(DTO entity) 4、selectById(Long id)	5、searchListPage(Pager page) 7、searchList(DTO dto)
 * @Description: 业务层方法名称前缀：新增：add* 删除：remove* 修改：modify* 查询对象：select* get* 批量：batch* 查询集合：search*
 */
@Service
public class AssVfRtnLogServiceImpl extends BaseBizImpl<AssVfRtnLog, AssVfRtnLogDTO, AssVfRtnLogQC> implements IAssVfRtnLogService {

    @SuppressWarnings("unused")
    private static final Logger logger = LoggerFactory.getLogger(AssVfRtnLogServiceImpl.class);

    @Autowired
    private AssVfRtnLogMapper assVfRtnLogMapper;

    @Override
    public List<AssVfRtnLogDTO> searchList(AssVfRtnLogQC condition) throws BaseException {
        if (null == condition) return new ArrayList<AssVfRtnLogDTO>();
        List<AssVfRtnLog> list = this.assVfRtnLogMapper.selectList(condition);
        return AssVfRtnLogTransform.toDTOList(list);
    }

    @Override
    public IBaseDao<AssVfRtnLog, AssVfRtnLogQC> getDao() {
        return this.assVfRtnLogMapper;
    }

    @Override
    public boolean removeByIds(List<Long> ids) throws BaseException {
        return assVfRtnLogMapper.removeByIds(ids);
    }
}

